<template>
                  <!-- 纸书预售 -->
  <div class="preSalePage">
    <!-- 公共组件 -->
    <Search />
    <MainNavList />
    <div class="preSalePage-title">
      <span>纸书预售中</span>
    </div>
    <div class="preSalePage-comtent">
      <div class="preSalePage-text">与<span>纸书预售中</span>相关的内容</div>
      <div class="preSalePage-books">
        <div
          class="newBook-oneBook"
          v-for="preSalePage in preSalePages"
          :key="preSalePage.id"
        >
          <div class="oneBookImg">
            <img
              v-lazy="`https://file.ituring.com.cn/Original/${preSalePage.coverKey}`"
            />
          </div>
          <div class="oneBook-text">
            <b class="oneBook-name">{{ preSalePage.name }}</b>
            <p class="oneBook-author">
              {{ preSalePage.authorNameString }}（作者）
            </p>
            <p class="oneBook-translator">
              {{
                preSalePage.translatorNameString
                  ? `${preSalePage.translatorNameString}（译者）`
                  : ''
              }}
            </p>
          </div>
        </div>
      </div>
      <div class="over" >已经到底啦~</div>
    </div>
    <!-- 脚注区域 -->
    <Footer />
  </div>
</template>

<script>
import API from '../../../../API/recommendPage'
export default {
  nam: 'PreSalePage',
  data(){
    return {
      preSalePages:[]
    }
  },
  async mounted(){
    const preSalePages = (await API.reqGetPreSalePage()).bookItems
    // console.log('preSalePages',preSalePages)
    this.preSalePages=Object.freeze(preSalePages)
  }
}
</script>

<style lang='less'>
.preSalePage {
  width: 100%;
  height: 100%;
  margin-top: 156px;
  .preSalePage-title {
    position: relative;
    width: 100%;
    height: 100px;
    background-color: #f5f9fb;
    font-size: 20px;
    color: #152844;
    text-align: center;
    position: fixed;
    z-index: 1;
    top: 56px;
    left: 0;
    span {
      position: absolute;
      width: 1080px;
      height: 100px;
      line-height: 100px;
      font-size: 20px;
      color: #152844;
      text-align: center;
      position: fixed;
      z-index: 1;
      top: 56px;
      left: 0;
      margin-left:20%;
    }
  }
  .preSalePage-comtent{
    width: 1080px;
    margin-left: 20%;
    border: 1px solid white;
    .preSalePage-text{
      color: #312f63;
      font-size: 14px;
      margin: 30px 0;
      span{
        color: #152844;
        font-weight: bold;
      }
    }
    .preSalePage-books{
      width: 100%;
      display: flex;
      justify-content:space-between;
    }
  }
  .over{
    width: 100%;
    font-size: 14px;
    color: rgb(119, 117, 117);
    text-align: center;
    margin-top: 10px;
  }
}
</style>